nofail SSH Mounting in fstab

The following /etc/fstab entry is placed on your client machine, connecting you to your remote machine using SSH keys:

Note that sshfs will have to be installed on your client in order for this to work. This can be done through your distro's package manager.

sshfs#{REMOTE}@{IP_ADDRESS}:/mnt/{REMOTE_DIR} /mnt/{CLIENT_DIR} fuse ServerAliveInterval=1,reconnect,port={PORT},defaults,_netdev,IdentityFile=/home/{CLIENT}/.ssh/id_rsa,allow_other,nofail 0 0

The port option can be ommited if the default SSH port is used.

The nofail option is important. If you client can't connect for whatever reason, your entire system won't halt due to a boot failure.

reconnect and ServerAliveInterval=1 are also important. These are used to ensure your machine doesn't halt in case the server/remote disconnects while the connection is in use.


Check out these notes...
2024-05-01 19:03:49 What is AvistaZ?
2024-01-09 20:37:26 Activating Windows 10 LTSC
2023-11-14 21:13:36 Server Neofetch 2023
2024-08-12 12:26:47 Understanding SQL Injections
2023-05-22 00:05:08 Autostart VMWare Workstation Pro VMs on Windows